package com.ruoyi.hr.controller.hr.personstatisticsanalysis;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.hr.service.entryexitmanage.EntryExitManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author zeo
 * @explain 人事统计分析
 * @date 2020/2/27
 */
@Controller
@RequestMapping("/personStatisticsAnalysis")
public class PersonStatisticsAnalysisController extends BaseController {

    @Autowired
    EntryExitManageService entryExitManageService;

    private String prefix = "hr/personStatisticsanalysis";

    /**
     * 跳转分页页面
     */
    @GetMapping()
    public String personStatisticsAnalysis() {
        return prefix + "/personStatisticsAnalysis";
    }

    /**
     * 欢迎
     */
    @GetMapping("/welcome")
    public String welcome() {
        return prefix + "/welcome";
    }

    /**
     * 加载薪资管理左侧树状
     */
    @GetMapping("/treeData")
    @ResponseBody
    public List<Ztree> treeData() {
        List<Ztree> ztrees = new ArrayList<Ztree>();
        Ztree ztree[] = {

                new Ztree((long) 100, (long) 0, "人事报表", "人事报表"),
                new Ztree((long) 101, (long) 100, "员工档案表", "员工档案表"),
                new Ztree((long) 102, (long) 100, "员工履历表", "员工履历表"),
                new Ztree((long) 103, (long) 100, "通讯录", "通讯录"),
                new Ztree((long) 104, (long) 100, "月度人员配置及流动", "月度人员配置及流动"),
                new Ztree((long) 105, (long) 100, "人力资源配置、成本与流动分析总表", "人力资源配置、成本与流动分析总表"),
                new Ztree((long) 106, (long) 100, "产值收入配置表", "产值收入配置表"),
        };
        for (int i = 0; i < ztree.length; i++) {
            ztrees.add(ztree[i]);
        }
        return ztrees;
    }
}
